Skip to content

Add parameter to prevent model from being saved to registry in get#53

Merged
JulianVennen merged 2 commits intomasterfrom
get-disable-registry
Mar 27, 2026
Merged

Add parameter to prevent model from being saved to registry in get#53
JulianVennen merged 2 commits intomasterfrom
get-disable-registry

Conversation

@JulianVennen
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an option to GenericModel::get() to optionally avoid persisting fetched models into the ModelRegistry, and introduces test coverage for the new registry behavior.

Changes:

  • Extend GenericModel::get() with a new $saveToRegistry parameter and adjust registry lookup behavior when $update is true.
  • Add a new PHPUnit test validating registry save/refresh behavior, including the new “don’t save” mode.
  • Enable registry usage in the test setup to exercise registry-related behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/GenericModel.php Adds $saveToRegistry parameter and updates registry interaction logic in get()
test/tests/TestDriverTest.php Enables registry in setup and adds testGetWithRegistry() to validate registry semantics

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JulianVennen JulianVennen requested a review from matthi4s March 27, 2026 22:13
@JulianVennen JulianVennen merged commit 4c0569d into master Mar 27, 2026
3 checks passed
@JulianVennen JulianVennen deleted the get-disable-registry branch March 27, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants